#include <QSettings>
#include <QApplication>

#include "settingsmanager.h"


QString SettingsManager::GetPlayerEmail()
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    return settings.value("PlayerEmail").toString();
}

QString SettingsManager::GetPasssword()
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    return settings.value("Passsword").toString();
}

QString SettingsManager::GetPOP3Server()
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    return settings.value("POP3Server").toString();
}

QString SettingsManager::GetSMTPServer()
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    return settings.value("SMTPServer").toString();
}

QString SettingsManager::GetOwnerEmail()
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    return settings.value("OwnerEmail").toString();
}

void SettingsManager::SetPlayerEmail(QString value)
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    settings.setValue("PlayerEmail",value);
}

void SettingsManager::SetPasssword(QString value)
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    settings.setValue("Passsword",value);
}

void SettingsManager::SetPOP3Server(QString value)
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    settings.setValue("POP3Server",value);
}

void SettingsManager::SetSMTPServer(QString value)
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    settings.setValue("SMTPServer",value);
}

void SettingsManager::SetOwnerEmail(QString value)
{
    QSettings settings(qApp->organizationName(),qApp->applicationName());
    settings.setValue("OwnerEmail",value);
}
